﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ARS.Control.Custom.Entity.Fields
{
    /// <summary>
    /// 外键
    /// </summary>
    public class ForeignKeyField:Field
    {
        public ForeignKeyField ()
        {          
            //base.Widget = new Forms.SelectForm();
        }

        public override Forms.Form Widget
        {
            get
            {
                if (base.Widget == null)
                {
                    base.Widget = new Forms.SelectForm();
                }
                return base.Widget;
            }
            set
            {
                base.Widget = value;
            }
        }

        public ForeignKeyConfig SelectDbSelectConfig
        {
            get;
            set;
        }


        /// <summary>
        /// 如果不为空，则绑定该值
        /// </summary>
        public string RequestKeyName
        {
            get;
            set;
        }
        /// <summary>
        /// 只读
        /// </summary>
        public bool IsReadOnly=false;
        /// <summary>
        /// 加密传输默认值
        /// </summary>
        public bool IsRequestKeyEncrypt = false;
        ///// <summary>
        ///// 取值列表
        ///// </summary>
        //public string ValueList
        //{
        //    get;
        //    set;
        //}

        //public string ForeignTableName
        //{
        //    get;
        //    set;
        //}
        /// <summary>
        /// 类名
        /// </summary>
//        public string ClassName
//        {
//            get;
//            set;
//        }
    }
}
